package com.csj.lc.entity;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.util.Date;

@Alias("operation")
@Data
public class Operation implements Serializable {

    private int operationId;
    private Date operateTime;
    private String content;
    private User user;

    public Operation(int userId) {
        this.user = new User();
        this.user.setUserId(userId);
        this.operateTime = new Date();
    }

//    @Override
//    public String toString() {
//        return "Operation{" +
//                "operationId=" + operationId +
//                ", operateTime=" + operateTime +
//                ", content='" + content + '\'' +
//                ", userId=" + userId +
//                ", user=" + user +
//                '}';
//    }

}

